﻿#include <QCoreApplication>

#include "flyweight.h"
#include "flyweightfactory.h"

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);

    Flyweight* fly1 = FlyweightFactory::getInstance()->getFlyweight("one");
    fly1->doOperate();

    Flyweight* fly2 = FlyweightFactory::getInstance()->getFlyweight("two");
    fly2->doOperate();

    Flyweight* fly3 = FlyweightFactory::getInstance()->getFlyweight("one");
    fly3->doOperate();

    return a.exec();
}
